<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>邻里 - 我的兑换</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f5f5;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            min-height: 100vh;
        }
        
        .header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .back-btn {
            font-size: 1.2rem;
            margin-right: 15px;
            cursor: pointer;
        }
        
        .header-title {
            flex: 1;
            text-align: center;
            font-size: 1.2rem;
            font-weight: bold;
        }
        
        .points {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: bold;
        }
        
        .stats-bar {
            display: flex;
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin: 15px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            justify-content: space-around;
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-value {
            font-size: 1.8rem;
            font-weight: bold;
            color: #2575fc;
            margin-bottom: 5px;
        }
        
        .stat-label {
            font-size: 0.9rem;
            color: #888;
        }
        
        .exchange-tabs {
            display: flex;
            background: white;
            border-bottom: 1px solid #eee;
            padding: 0 10px;
            position: sticky;
            top: 80px;
            z-index: 90;
        }
        
        .exchange-tab {
            flex: 1;
            text-align: center;
            padding: 15px 5px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            font-size: 0.9rem;
        }
        
        .exchange-tab.active {
            color: #2575fc;
            border-bottom: 3px solid #2575fc;
        }
        
        .content {
            padding: 15px;
        }
        
        .exchange-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            margin-bottom: 20px;
            overflow: hidden;
        }
        
        .exchange-header {
            display: flex;
            justify-content: space-between;
            padding: 15px;
            border-bottom: 1px solid #f0f0f0;
            align-items: center;
        }
        
        .exchange-id {
            color: #888;
            font-size: 0.85rem;
        }
        
        .exchange-status {
            font-size: 0.9rem;
            font-weight: bold;
            padding: 4px 10px;
            border-radius: 12px;
        }
        
        .status-completed {
            background: #e6f7ee;
            color: #00a76f;
        }
        
        .status-pending {
            background: #fff7e6;
            color: #ff9500;
        }
        
        .status-shipping {
            background: #e6f0ff;
            color: #2575fc;
        }
        
        .status-received {
            background: #f0e6ff;
            color: #8a2be2;
        }
        
        .exchange-content {
            padding: 15px;
            display: flex;
        }
        
        .exchange-img {
            width: 80px;
            height: 80px;
            border-radius: 8px;
            object-fit: cover;
            margin-right: 15px;
            background: #f0f0f0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            font-size: 0.8rem;
            text-align: center;
        }
        
        .exchange-info {
            flex: 1;
        }
        
        .exchange-title {
            font-weight: bold;
            margin-bottom: 8px;
            font-size: 1.05rem;
        }
        
        .exchange-desc {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
        
        .exchange-specs {
            display: flex;
            color: #888;
            font-size: 0.85rem;
            margin-bottom: 10px;
        }
        
        .exchange-specs span {
            margin-right: 15px;
        }
        
        .exchange-footer {
            display: flex;
            justify-content: space-between;
            padding: 15px;
            border-top: 1px solid #f0f0f0;
            align-items: center;
        }
        
        .exchange-date {
            color: #888;
            font-size: 0.85rem;
        }
        
        .exchange-points {
            font-weight: bold;
            color: #ff9500;
            display: flex;
            align-items: center;
        }
        
        .exchange-points i {
            margin-right: 5px;
        }
        
        .exchange-actions {
            display: flex;
            justify-content: flex-end;
            padding: 0 15px 15px;
            gap: 10px;
        }
        
        .btn {
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .btn-primary {
            background: #2575fc;
            color: white;
            border: none;
        }
        
        .btn-outline {
            background: transparent;
            color: #555;
            border: 1px solid #ddd;
        }
        
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: #888;
        }
        
        .empty-state i {
            font-size: 4rem;
            margin-bottom: 15px;
            color: #d0d0d0;
        }
        
        .empty-state p {
            margin-bottom: 20px;
        }
        
        .explore-btn {
            display: inline-block;
            padding: 10px 25px;
            background: #2575fc;
            color: white;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 500;
        }
        
        .menu {
            background: white;
            margin-top: 30px;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            overflow: hidden;
        }
        
        .menu-item {
            padding: 16px 20px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .menu-item:last-child {
            border-bottom: none;
        }
        
        .menu-item span {
            font-weight: 500;
        }
        
        .arrow {
            color: #999;
        }
        
        .points-history {
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin: 15px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }
        
        .points-history h3 {
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .view-all {
            font-size: 0.9rem;
            color: #2575fc;
            text-decoration: none;
        }
        
        .points-item {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid #f5f5f5;
        }
        
        .points-item:last-child {
            border-bottom: none;
        }
        
        .points-desc {
            font-size: 0.95rem;
        }
        
        .points-date {
            font-size: 0.85rem;
            color: #888;
        }
        
        .points-change {
            font-weight: bold;
        }
        
        .points-add {
            color: #00a76f;
        }
        
        .points-subtract {
            color: #ff4757;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="back-btn">
                <i class="fas fa-arrow-left"></i>
            </div>
            <div class="header-title">我的兑换</div>
            <div class="points">积分: 350</div>
        </div>
        
        <div class="stats-bar">
            <div class="stat-item">
                <div class="stat-value">8</div>
                <div class="stat-label">全部兑换</div>
            </div>
            <div class="stat-item">
                <div class="stat-value">5</div>
                <div class="stat-label">待领取</div>
            </div>
            <div class="stat-item">
                <div class="stat-value">3</div>
                <div class="stat-label">已完成</div>
            </div>
        </div>
        
        <div class="exchange-tabs">
            <div class="exchange-tab active">全部</div>
            <div class="exchange-tab">待领取</div>
            <div class="exchange-tab">配送中</div>
            <div class="exchange-tab">已完成</div>
        </div>
        
        <div class="content">
            <div class="exchange-card">
                <div class="exchange-header">
                    <div class="exchange-id">兑换单号: #DH20231015001</div>
                    <div class="exchange-status status-received">待领取</div>
                </div>
                <div class="exchange-content">
                    <div class="exchange-img">电影票图片</div>
                    <div class="exchange-info">
                        <div class="exchange-title">万达电影通票</div>
                        <div class="exchange-desc">任意场次均可使用，有效期至2023-12-31</div>
                        <div class="exchange-specs">
                            <span>数量: 2张</span>
                        </div>
                    </div>
                </div>
                <div class="exchange-footer">
                    <div class="exchange-date">2023-10-15 14:30</div>
                    <div class="exchange-points">
                        <i class="fas fa-coins"></i> 200积分
                    </div>
                </div>
                <div class="exchange-actions">
                    <button class="btn btn-primary">领取凭证</button>
                    <button class="btn btn-outline">查看详情</button>
                </div>
            </div>
            
            <div class="exchange-card">
                <div class="exchange-header">
                    <div class="exchange-id">兑换单号: #DH20231012005</div>
                    <div class="exchange-status status-shipping">配送中</div>
                </div>
                <div class="exchange-content">
                    <div class="exchange-img">礼品图片</div>
                    <div class="exchange-info">
                        <div class="exchange-title">品牌保温杯</div>
                        <div class="exchange-desc">500ml容量，保冷保温，多种颜色随机发货</div>
                        <div class="exchange-specs">
                            <span>数量: 1个</span>
                        </div>
                    </div>
                </div>
                <div class="exchange-footer">
                    <div class="exchange-date">2023-10-12 09:15</div>
                    <div class="exchange-points">
                        <i class="fas fa-coins"></i> 350积分
                    </div>
                </div>
                <div class="exchange-actions">
                    <button class="btn btn-primary">查看物流</button>
                    <button class="btn btn-outline">确认收货</button>
                </div>
            </div>
            
            <div class="exchange-card">
                <div class="exchange-header">
                    <div class="exchange-id">兑换单号: #DH20231008003</div>
                    <div class="exchange-status status-completed">已完成</div>
                </div>
                <div class="exchange-content">
                    <div class="exchange-img">咖啡券图片</div>
                    <div class="exchange-info">
                        <div class="exchange-title">星巴克中杯券</div>
                        <div class="exchange-desc">任意口味均可兑换，有效期至2023-11-30</div>
                        <div class="exchange-specs">
                            <span>数量: 1张</span>
                        </div>
                    </div>
                </div>
                <div class="exchange-footer">
                    <div class="exchange-date">2023-10-08 16:45</div>
                    <div class="exchange-points">
                        <i class="fas fa-coins"></i> 150积分
                    </div>
                </div>
                <div class="exchange-actions">
                    <button class="btn btn-outline">再次兑换</button>
                    <button class="btn btn-outline">查看详情</button>
                </div>
            </div>
            
            <div class="points-history">
                <h3>
                    <span>积分记录</span>
                    <a href="#" class="view-all">查看全部 ></a>
                </h3>
                <div class="points-item">
                    <div>
                        <div class="points-desc">兑换星巴克中杯券</div>
                        <div class="points-date">2023-10-08 16:45</div>
                    </div>
                    <div class="points-change points-subtract">-150</div>
                </div>
                <div class="points-item">
                    <div>
                        <div class="points-desc">邻里节活动奖励</div>
                        <div class="points-date">2023-10-07 09:20</div>
                    </div>
                    <div class="points-change points-add">+100</div>
                </div>
                <div class="points-item">
                    <div>
                        <div class="points-desc">发布物品获得积分</div>
                        <div class="points-date">2023-10-05 14:30</div>
                    </div>
                    <div class="points-change points-add">+50</div>
                </div>
            </div>
            
            <div class="empty-state">
                <i class="fas fa-gift"></i>
                <p>暂无更多兑换记录</p>
                <a href="#" class="explore-btn">去积分商城看看</a>
            </div>
            
            <div class="menu">
                <div class="menu-item">
                    <span>我的发布</span>
                    <span class="arrow">›</span>
                </div>
                <div class="menu-item">
                    <span>我的订单</span>
                    <span class="arrow">›</span>
                </div>
                <div class="menu-item">
                    <span>我的帖子</span>
                    <span class="arrow">›</span>
                </div>
                <div class="menu-item">
                    <span>设置</span>
                    <span class="arrow">›</span>
                </div>
                <div class="menu-item">
                    <span>客服中心</span>
                    <span class="arrow">›</span>
                </div>
                <div class="menu-item">
                    <span>关于邻里</span>
                    <span class="arrow">›</span>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 选项卡切换功能
        document.querySelectorAll('.exchange-tab').forEach(tab => {
            tab.addEventListener('click', function() {
                // 移除所有标签的活跃状态
                document.querySelectorAll('.exchange-tab').forEach(t => {
                    t.classList.remove('active');
                });
                
                // 设置选中的标签为活跃状态
                this.classList.add('active');
                
                // 这里可以添加加载不同状态兑换记录的逻辑
            });
        });
        
        // 返回按钮功能
        document.querySelector('.back-btn').addEventListener('click', function() {
            alert('返回上一页');
            // 实际应用中这里应该是 history.back() 或路由跳转
        });
    </script>
</body>
</html>